const { ErrorModel } = require('../../../../common/model/res-model')

module.exports = async (ctx, next) => {
	if (!ctx.session.username) {
		return (ctx.body = new ErrorModel('未登录'))
	}
	await next()
}
